package com.yingxin.yx.framework.commons.enums.task;

/**
 * 任务分类枚举
 */

public enum DynamicTaskTypeEnums {

    SYSTEM("SYSTEM", "系统管理"),

    CONTRACT("CONTRACT", "合同管理"),

    STOCK("STOCK", "库存管理"),

    PRODUCE("PRODUCE","生产管理"),

    SALE("SALE", "销售管理"),

    FINANCE("FINANCE","财务管理"),

    SPARE("SPARE", "备品备件" ),

    REPORT("REPORT", "报表管理"),

    ;

    private String type;

    private String typeName;

    DynamicTaskTypeEnums(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static DynamicTaskTypeEnums getEnum(String type) {
        if (type == null) {
            return null;
        }
        for (DynamicTaskTypeEnums i : DynamicTaskTypeEnums.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }

}
